3.8.2 \(\int \frac {x}{a-b+2 a x^2+a x^4} \, dx\)

Optimal. Leaf size=31 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {1107, 618, 206} \begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x/(a - b + 2*a*x^2 + a*x^4),x]

[Out]

-ArcTanh[(Sqrt[a]*(1 + x^2))/Sqrt[b]]/(2*Sqrt[a]*Sqrt[b])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1107

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rubi steps

\begin {align*} \int \frac {x}{a-b+2 a x^2+a x^4} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{a-b+2 a x+a x^2} \, dx,x,x^2\right )\\ &=-\operatorname {Subst}\left (\int \frac {1}{4 a b-x^2} \, dx,x,2 a \left (1+x^2\right )\right )\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 31, normalized size = 1.00 \begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x/(a - b + 2*a*x^2 + a*x^4),x]

[Out]

-1/2*ArcTanh[(Sqrt[a]*(1 + x^2))/Sqrt[b]]/(Sqrt[a]*Sqrt[b])

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x}{a-b+2 a x^2+a x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[x/(a - b + 2*a*x^2 + a*x^4),x]

[Out]

IntegrateAlgebraic[x/(a - b + 2*a*x^2 + a*x^4), x]

________________________________________________________________________________________

fricas [A]  time = 1.11, size = 91, normalized size = 2.94 \begin {gather*} \left [\frac {\sqrt {a b} \log \left (\frac {a x^{4} + 2 \, a x^{2} - 2 \, \sqrt {a b} {\left (x^{2} + 1\right )} + a + b}{a x^{4} + 2 \, a x^{2} + a - b}\right )}{4 \, a b}, \frac {\sqrt {-a b} \arctan \left (\frac {\sqrt {-a b}}{a x^{2} + a}\right )}{2 \, a b}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a*x^4+2*a*x^2+a-b),x, algorithm="fricas")

[Out]

[1/4*sqrt(a*b)*log((a*x^4 + 2*a*x^2 - 2*sqrt(a*b)*(x^2 + 1) + a + b)/(a*x^4 + 2*a*x^2 + a - b))/(a*b), 1/2*sqr
t(-a*b)*arctan(sqrt(-a*b)/(a*x^2 + a))/(a*b)]

________________________________________________________________________________________

giac [A]  time = 0.26, size = 23, normalized size = 0.74 \begin {gather*} \frac {\arctan \left (\frac {a x^{2} + a}{\sqrt {-a b}}\right )}{2 \, \sqrt {-a b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a*x^4+2*a*x^2+a-b),x, algorithm="giac")

[Out]

1/2*arctan((a*x^2 + a)/sqrt(-a*b))/sqrt(-a*b)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 26, normalized size = 0.84 \begin {gather*} -\frac {\arctanh \left (\frac {2 a \,x^{2}+2 a}{2 \sqrt {a b}}\right )}{2 \sqrt {a b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/(a*x^4+2*a*x^2+a-b),x)

[Out]

-1/2/(a*b)^(1/2)*arctanh(1/2*(2*a*x^2+2*a)/(a*b)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 3.02, size = 37, normalized size = 1.19 \begin {gather*} \frac {\log \left (\frac {a x^{2} + a - \sqrt {a b}}{a x^{2} + a + \sqrt {a b}}\right )}{4 \, \sqrt {a b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a*x^4+2*a*x^2+a-b),x, algorithm="maxima")

[Out]

1/4*log((a*x^2 + a - sqrt(a*b))/(a*x^2 + a + sqrt(a*b)))/sqrt(a*b)

________________________________________________________________________________________

mupad [B]  time = 4.34, size = 31, normalized size = 1.00 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\sqrt {a}\,\sqrt {b}\,x^2}{a\,x^2+a-b}\right )}{2\,\sqrt {a}\,\sqrt {b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/(a - b + 2*a*x^2 + a*x^4),x)

[Out]

atanh((a^(1/2)*b^(1/2)*x^2)/(a - b + a*x^2))/(2*a^(1/2)*b^(1/2))

________________________________________________________________________________________

sympy [A]  time = 0.34, size = 53, normalized size = 1.71 \begin {gather*} \frac {\sqrt {\frac {1}{a b}} \log {\left (- b \sqrt {\frac {1}{a b}} + x^{2} + 1 \right )}}{4} - \frac {\sqrt {\frac {1}{a b}} \log {\left (b \sqrt {\frac {1}{a b}} + x^{2} + 1 \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a*x**4+2*a*x**2+a-b),x)

[Out]

sqrt(1/(a*b))*log(-b*sqrt(1/(a*b)) + x**2 + 1)/4 - sqrt(1/(a*b))*log(b*sqrt(1/(a*b)) + x**2 + 1)/4

________________________________________________________________________________________